# CMakeLists.txt
cmake_minimum_required(VERSION 3.1)
project(MySDK VERSION 1.0.0)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 创建共享库
add_library(mysdk SHARED
    sdk.cpp
    c_sdk.cpp
    smart_ptr_sdk.cpp
)

# 设置库的版本
set_target_properties(mysdk PROPERTIES
    VERSION ${PROJECT_VERSION}
    SOVERSION 1
)

# 安装规则
install(TARGETS mysdk
    LIBRARY DESTINATION lib
    ARCHIVE DESTINATION lib
    RUNTIME DESTINATION bin
)

install(FILES 
    sdk.h 
    c_sdk.h 
    smart_ptr_sdk.h
    DESTINATION include/mysdk
)